<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
class PHPExcel_Worksheet_AutoFilter_Column
{
    private $parent;
    private $columnIndex = "";
    private $filterType = "filters";
    private $join = "or";
    private $ruleset = [];
    private $attributes = [];
    private static $filterTypes = ["filters", "customFilters", "dynamicFilter", "top10"];
    private static $ruleJoins = ["and", "or"];
    const AUTOFILTER_FILTERTYPE_FILTER = "filters";
    const AUTOFILTER_FILTERTYPE_CUSTOMFILTER = "customFilters";
    const AUTOFILTER_FILTERTYPE_DYNAMICFILTER = "dynamicFilter";
    const AUTOFILTER_FILTERTYPE_TOPTENFILTER = "top10";
    const AUTOFILTER_COLUMN_JOIN_AND = "and";
    const AUTOFILTER_COLUMN_JOIN_OR = "or";
    public function __construct($pColumn, PHPExcel_Worksheet_AutoFilter $pParent = NULL)
    {
        $this->columnIndex = $pColumn;
        $this->parent = $pParent;
    }
    public function getColumnIndex()
    {
        return $this->columnIndex;
    }
    public function setColumnIndex($pColumn)
    {
        $pColumn = strtoupper($pColumn);
        if($this->parent !== NULL) {
            $this->parent->testColumnInRange($pColumn);
        }
        $this->columnIndex = $pColumn;
        return $this;
    }
    public function getParent()
    {
        return $this->parent;
    }
    public function setParent(PHPExcel_Worksheet_AutoFilter $pParent = NULL)
    {
        $this->parent = $pParent;
        return $this;
    }
    public function getFilterType()
    {
        return $this->filterType;
    }
    public function setFilterType($pFilterType = self::AUTOFILTER_FILTERTYPE_FILTER)
    {
        if(!in_array($pFilterType, self::$filterTypes)) {
            throw new PHPExcel_Exception("Invalid filter type for column AutoFilter.");
        }
        $this->filterType = $pFilterType;
        return $this;
    }
    public function getJoin()
    {
        return $this->join;
    }
    public function setJoin($pJoin = self::AUTOFILTER_COLUMN_JOIN_OR)
    {
        $pJoin = strtolower($pJoin);
        if(!in_array($pJoin, self::$ruleJoins)) {
            throw new PHPExcel_Exception("Invalid rule connection for column AutoFilter.");
        }
        $this->join = $pJoin;
        return $this;
    }
    public function setAttributes($pAttributes = [])
    {
        $this->attributes = $pAttributes;
        return $this;
    }
    public function setAttribute($pName, $pValue)
    {
        $this->attributes[$pName] = $pValue;
        return $this;
    }
    public function getAttributes()
    {
        return $this->attributes;
    }
    public function getAttribute($pName)
    {
        if(isset($this->attributes[$pName])) {
            return $this->attributes[$pName];
        }
        return NULL;
    }
    public function getRules()
    {
        return $this->ruleset;
    }
    public function getRule($pIndex)
    {
        if(!isset($this->ruleset[$pIndex])) {
            $this->ruleset[$pIndex] = new PHPExcel_Worksheet_AutoFilter_Column_Rule($this);
        }
        return $this->ruleset[$pIndex];
    }
    public function createRule()
    {
        $this->ruleset[] = new PHPExcel_Worksheet_AutoFilter_Column_Rule($this);
        return end($this->ruleset);
    }
    public function addRule(PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule, $returnRule = true)
    {
        $pRule->setParent($this);
        $this->ruleset[] = $pRule;
        return $returnRule ? $pRule : $this;
    }
    public function deleteRule($pIndex)
    {
        if(isset($this->ruleset[$pIndex])) {
            unset($this->ruleset[$pIndex]);
            if(count($this->ruleset) <= 1) {
                $this->setJoin("or");
            }
        }
        return $this;
    }
    public function clearRules()
    {
        $this->ruleset = [];
        $this->setJoin("or");
        return $this;
    }
    public function __clone()
    {
        $vars = get_object_vars($this);
        foreach ($vars as $key => $value) {
            if(is_object($value)) {
                if($key == "parent") {
                    $this->{$key} = NULL;
                } else {
                    $this->{$key} = clone $value;
                }
            } elseif(is_array($value) && $key == "ruleset") {
                $this->{$key} = [];
                foreach ($value as $k => $v) {
                    $this->{$key}[$k] = clone $v;
                    $this->{$key}[$k]->setParent($this);
                }
            } else {
                $this->{$key} = $value;
            }
        }
    }
}

?>